﻿$j = $.noConflict();
SUIIS = function(){
	var _getHtml = null;
	
	function _search_result(){
		// 查詢餐館結果開新連結
		$j.each( $j('span.t10Blue a'), function(i, a){
			a.target = a.innerHTML;
		});
	}
	
	function _main(){
		if(/search_result\.aspx/.test(gm.url)){
			_search_result();
		}		
	}

	return{
		version: '2007.12.26',
		// ---------------------------------------------------------------------------
		// 由此啟動
		// ---------------------------------------------------------------------------
		main: function(f, options){	// 注意: 不可直接傳入 GM_xmlhttpRequest, 會導致 permittion error
			gm.log('SUIIS v{0}', this.version);
			
			_getHtml = f;
			_main();
		}

	};
}();